package divinity.animation
{
	import divinity.animation.tweener.Tweener;
	import divinity.utils.log.Log;
	import flash.utils.Dictionary;
	
	
	/**
	 * ...
	 * @author Filip Prebeg
	 */
	public class Tween
	{
		private static var _tweens:Dictionary=new Dictionary();
		private static var _log:Log = new Log("TweenManager");
		public function Tween()
		{
			
		}
		/**
		 * Adds a tween operation to Tween manager. If Tween already exists for spcified clip it will be updated with new parameters.
		 * @param	clip Sprite or a Movie Clip that is to be Tweened
		 * @param	props Properties of tweening operation
		 */
		public static function addTween(clip:*, props:Object)
		{
			_log.addLog( new Tween(), "Tween added for " + clip);
			var z:int = _tweens.length;
			trace(_tweens[clip] == null);
			if (_tweens[clip] != null)
			{
				_tweens[clip].destroyMe();
			}
			_tweens[clip]=new Tweener(clip, props);
			
		}
	
	}

}